From: Florian Müllner Date: Tue, 10 Mar 2015 22:55:30 +0000 (+0100) Subject: calendar: Guard against null passed to setBody() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1524 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9becb3985d1245b3b75471cfae3b5d8b5c3102a7;p=gnome-shell.git calendar: Guard against null passed to setBody() --- diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 19d154ad2..cb63d6aae 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -1044,7 +1044,8 @@ const Message = new Lang.Class({ setBody: function(text) { this._bodyText = text; - this.bodyLabel.setMarkup(text.replace(/\n/g, ' '), this._useBodyMarkup); + this.bodyLabel.setMarkup(text ? text.replace(/\n/g, ' ') : '', + this._useBodyMarkup); }, setUseBodyMarkup: function(enable) {